home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #9
/
Amiga Plus CD - 2004 - No. 09.iso
/
amigaplus
/
online
/
ibrowse_plugins
/
openurl
/
developer
/
c
/
include
/
libraries
/
openurl.h
Wrap
C/C++ Source or Header
|
2004-08-03
|
5KB
|
143 lines
#ifndef LIBRARIES_OPENURL_H
#define LIBRARIES_OPENURL_H
/*
** $VER: openurl.h 4.4 (1.3.2003)
** Includes Release 4.4
**
** openurl.library - universal URL display and browser
** launcher library
**
** Written by Troels Walsted Hansen <troels@thule.no>
** Placed in the public domain.
**
** Developed by:
** - Alfonso Ranieri <alforan@tin.it>
** - Stefan Kost <ensonic@sonicpulse.de>
**
*/
#ifndef EXEC_TYPES_H
#include <exec/types.h>
#endif
#ifndef EXEC_LISTS_H
#include <exec/lists.h>
#endif
#ifndef EXEC_NODES_H
#include <exec/nodes.h>
#endif
#ifndef UTILITY_TAGITEM_H
#include <utility/tagitem.h>
#endif
/**************************************************************************/
/*
** Tags
*/
#define URL_Tagbase TAG_USER
#define URL_Show (URL_Tagbase + 1) /* BOOL - show/uniconify browser */
#define URL_BringToFront (URL_Tagbase + 2) /* BOOL - bring browser to front */
#define URL_NewWindow (URL_Tagbase + 3) /* BOOL - open URL in new window */
#define URL_Launch (URL_Tagbase + 4) /* BOOL - launch browser when not running */
#define URL_PubScreenName (URL_Tagbase + 5) /* STRPTR - name of public screen to launch at */
#define URL_GetPrefs_Default (URL_Tagbase + 20)
#define URL_SetPrefs_Save (URL_Tagbase + 30)
/**************************************************************************/
/*
** Version 3 Prefs
*/
#define PREFS_VERSION ((UBYTE)3)
struct URL_Prefs
{
UBYTE up_Version; /* always check this version number! */
struct MinList up_BrowserList; /* list of struct URL_BrowserNodes */
struct MinList up_MailerList; /* V3 - list of struct URL_MailerNodes */
LONGBITS up_Flags; /* V2 - flags, see below */
BOOL up_DefShow; /* these BOOLs are the defaults for */
BOOL up_DefBringToFront; /* the similarly named tags */
BOOL up_DefNewWindow; /* they are all new with Version 2 */
BOOL up_DefLaunch;
};
/* up_Flags */
enum
{
UPF_ISDEFAULTS = 1<<0, /* V2 - structure contains the default settings */
UPF_PREPENDHTTP = 1<<1, /* V3 - prepend "http://" to URLs w/o scheme */
UPF_DOMAILTO = 1<<2, /* V3 - mailto: URLs get special treatment */
};
/**************************************************************************/
/*
** Browsers
*/
#define REXX_CMD_LEN 64
#define UBN_NAME_LEN 32
#define UBN_PATH_LEN 256
#define UBN_PORT_LEN 32
#define UBN_SHOWCMD_LEN REXX_CMD_LEN
#define UBN_TOFRONTCMD_LEN REXX_CMD_LEN
#define UBN_OPENURLCMD_LEN REXX_CMD_LEN
#define UBN_OPENURLWCMD_LEN REXX_CMD_LEN
struct URL_BrowserNode
{
struct MinNode ubn_Node;
LONGBITS ubn_Flags; /* flags, see below */
TEXT ubn_Name[UBN_NAME_LEN]; /* name of webbrowser */
TEXT ubn_Path[UBN_PATH_LEN]; /* complete path to browser */
TEXT ubn_Port[UBN_PORT_LEN]; /* webbrowser arexx port */
TEXT ubn_ShowCmd[UBN_SHOWCMD_LEN]; /* command to show/uniconify browser */
TEXT ubn_ToFrontCmd[UBN_TOFRONTCMD_LEN]; /* command to bring browser to front */
TEXT ubn_OpenURLCmd[UBN_OPENURLCMD_LEN]; /* command to open url */
TEXT ubn_OpenURLWCmd[UBN_OPENURLWCMD_LEN]; /* command to open url in new window */
};
/* ubn_Flags */
enum
{
UBNF_URLONCMDLINE = 1<<0, /* if set, browser supports getting an URL on
the commandline when launched. obsolete as
of V3 - use %u on commandline instead */
};
/**************************************************************************/
/*
** Mailers
*/
#define UMN_NAME_LEN 32
#define UMN_PATH_LEN 256
#define UMN_PORT_LEN 32
#define UMN_SHOWCMD_LEN REXX_CMD_LEN
#define UMN_TOFRONTCMD_LEN REXX_CMD_LEN
#define UMN_WRITEMAILCMD_LEN (REXX_CMD_LEN * 2)
struct URL_MailerNode
{
struct MinNode umn_Node;
LONGBITS umn_Flags; /* flags, none defined */
TEXT umn_Name[UMN_NAME_LEN]; /* name of mailer */
TEXT umn_Path[UMN_PATH_LEN]; /* complete path to mailer */
TEXT umn_Port[UMN_PORT_LEN]; /* mailer arexx port */
TEXT umn_ShowCmd[UMN_SHOWCMD_LEN]; /* command to show/uniconify mailer */
TEXT umn_ToFrontCmd[UMN_TOFRONTCMD_LEN]; /* command to bring mailer to front */
TEXT umn_WriteMailCmd[UMN_WRITEMAILCMD_LEN]; /* command to write mail */
};
/**************************************************************************/
#endif /* LIBRARIES_OPENURL_H */